{include file="../header.tpl"}

<div class="container">
{if $accountType == 1}
    <h1>Nieuwsbuis: Standaard account aanmaken</h1>
    {elseif $accountType == 2}
    <h1>Nieuwsbuis: Pro account aanmaken</h1>
{/if}

    <p>Vul je gegevens in om registratie te voltooien</p>

    <form action="/auth/register" method="post">
        <fieldset>
            <legend>Persoonlijke gegevens</legend>

            <div class="clearfix{if form_error('firstName')} error{/if}">
                <label for="firstName">Voornaam</label>

                <div class="input">
                    <input class="span4"
                           type="text"
                           name="firstName"
                           id="firstName"
                           placeholder="Voornaam"
                           value="{set_value('firstName')}"/>
                {form_error('firstName')}
                </div>
            </div>

            <div class="clearfix{if form_error('lastName')} error{/if}">
                <label for="lastName">Achternaam</label>

                <div class="input">
                    <input class="span4"
                           type="text"
                           name="lastName"
                           id="lastName"
                           placeholder="Achternaam"
                           value="{set_value('lastName')}"/>
                {form_error('lastName')}
                </div>
            </div>

            <div class="clearfix">
                <label for="gender">Geslacht</label>

                <div class="input">
                    <select name="gender" id="gender" class="span4">
                        <option value="o" {if set_value("gender") == "o"}selected{/if}>Overig</option>
                        <option value="m" {if set_value("gender") == "m"}selected{/if}>Man</option>
                        <option value="v" {if set_value("gender") == "v"}selected{/if}>Vrouw</option>
                    </select>
                </div>
            </div>

            <div class="clearfix{if form_error('email')} error{/if}">
                <label for="email">Email</label>

                <div class="input">
                    <input class="span4"
                           type="text"
                           name="email"
                           id="email"
                           placeholder="voorbeeld@gmail.com"
                           value="{set_value('email')}" />
                {form_error('email')}
                </div>
            </div>
        </fieldset>
        <fieldset>

            <legend>Accountgegevens</legend>

            <div class="clearfix{if form_error('username')} error{/if}">
                <label for="username">Gebruikersnaam</label>

                <div class="input">
                    <input class="span4"
                           type="text"
                           name="username"
                           id="username"
                           placeholder="Username"
                           value="{set_value('username')}" />
                {form_error('username')}
                </div>
            </div>

            <div class="clearfix{if form_error('password')} error{/if}">
                <label for="password">Wachtwoord</label>

                <div class="input">
                    <input class="span4" type="password" name="password" id="password"/>
                {form_error('password')}
                </div>
            </div>

            <div class="clearfix{if form_error('passwordConfirmation')} error{/if}">
                <label for="passwordConfirmation">Bevestig wachtwoord</label>

                <div class="input">
                    <input class="span4" type="password" name="passwordConfirmation" id="passwordConfirmation"/>
                {form_error('passwordConfirmation')}
                </div>
            </div>

        </fieldset>

    {if $accountType == 2}
        <fieldset>
            <legend>Betaalgegevens</legend>

            <div class="clearfix{if form_error('bankAccount')} error{/if}">
                <label for="bankAccount">Rekeningnummer</label>

                <div class="input">
                    <input class="span4"
                           type="text"
                           name="bankAccount"
                           id="bankAccount"
                           placeholder="Rekeningnummer"
                           value="{set_value('bankAccount')}" />
                    {form_error('bankAccount')}
                </div>
            </div>

            <div class="clearfix{if form_error('agreePayment')} error{/if}">
                <label for="agreePayment">Betaling</label>

                <div class="input">
                    <ul class="inputs-list">
                        <li>
                            <label>
                                <input type="checkbox" id="agreePayment" name="agreePayment" value="agreePayment">

                                <p class="span6">Ik geef Nieuwsbuis toestemming tot het afschrijven van het bedrag
                                    van &euro; 1,- per maand (ieder moment opzegbaar)</p>
                            </label>
                        </li>
                    </ul>
                    {form_error('agreePayment')}
                </div>
            </div>
        </fieldset>
    {/if}

        <input type="hidden" name="accountType" value="{$accountType}"/>
        <input type="hidden" name="submit" value=1/>

        <div class="clearfix">
            <div class="input">
                <button type='submit' class="btn primary medium span4">Registreer &raquo;</button>
            </div>
        </div>

    </form>

{include file="../footer.tpl"}